public class ChargeSnapshotHolderModel extends Object implements XMLMarshallable
This class represents a charge activation inside a
subscription snapshot holder,
and contains the list of included counters.
It contains the following information:
status of the charge activation.The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="chargeSnapshotHolder">
<xs:complexType>
<xs:sequence>
<xs:element ref="counter" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute name="code" type="xs:string" />
<xs:attribute name="status" type="CAStatusType" />
<xs:attribute name="lastActivationDate" type="xs:dateTime" />
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
MODEL_NAME
The name of the object.
|
| Constructor and Description |
|---|
ChargeSnapshotHolderModel()
Builds an empty
ChargeSnapshotHolderModel. |
ChargeSnapshotHolderModel(String chargeCode)
Builds a
ChargeSnapshotHolderModel with a charge activation code. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
void |
addCounter(CounterModel counter)
Add a
counter to the snapshot holder |
String |
getCode()
Gets the code of the associated
charge activation. |
List<CounterModel> |
getCounters()
Gets the list of
counters contained in the snapshot holder. |
Date |
getLastActivationDate()
Gets the last activation date stored for the associated
charge activation. |
String |
getStatus()
Gets the status stored for the associated
charge activation. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setCode(String code)
Sets the code of the associated
charge activation. |
void |
setCounters(List<CounterModel> counters)
Sets the list of
counters contained in the snapshot holder. |
void |
setLastActivationDate(Date lastActivationDate)
Sets the last activation date stored for the associated
charge activation. |
void |
setStatus(String status)
Sets the status stored for the associated
charge activation. |
public static final String MODEL_NAME
public ChargeSnapshotHolderModel()
ChargeSnapshotHolderModel.public ChargeSnapshotHolderModel(String chargeCode)
ChargeSnapshotHolderModel with a charge activation code.chargeCode - the code of a charge activationpublic String getCode()
charge activation.charge activationpublic void setCode(String code)
charge activation.code - the code of the associated charge activationpublic String getStatus()
charge activation. Possible values:
charge activationpublic void setStatus(String status)
charge activation. Possible values:
status - the status to store for the associated charge activationpublic Date getLastActivationDate()
charge activation.charge activationpublic void setLastActivationDate(Date lastActivationDate)
charge activation.lastActivationDate - the last activation date to store for the associated charge activationpublic List<CounterModel> getCounters()
counters contained in the snapshot holder.counters contained in the snapshot holderpublic void setCounters(List<CounterModel> counters)
counters contained in the snapshot holder.counters - the list of counters contained in the snapshot holderpublic void addCounter(CounterModel counter)
counter to the snapshot holdercounter - the counter to add to the snasphot holderpublic void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into